﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Net;
using System.Web;
using System.Windows.Forms;
using Microsoft.SharePoint.Administration;
using Wagner.Utilities;

namespace Wagner.SharePoint.Utilities
{
	internal class RestartTimer : OperationBase
	{
		internal RestartTimer()
		{}

		internal override void Run()
		{			
			// Restart the Windows SharePoint Timer Server (SPTimerV3).
			Console.WriteLine("Restarting the Windows SharePoint Timer Server (SPTimerV3) service.");
			ServiceUtilities.RestartSharePointTimerService();
		}

		internal override string HelpSummary
		{
			get
			{
				return @"
-o RestartTimer 
     Restarts the Windows SharePoint Timer Server (SPTimerV3) service. Faster.";
			}
		}

		internal override string HelpDetail
		{
			get
			{
				string help = HelpSummary + @"
Usage:
  SPDev.exe -o RestartTimer

    Parameters: 
     none
     
Example:
 SPDev.exe -o RestartTimer

";

				return help;
			}
		}

	}	
}
